package com.core.zyyz.amc.modules.service.impl;

import java.util.List;

import com.core.common.utils.uuid.UUID;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.core.zyyz.amc.modules.mapper.AmcPubFunctionBMapper;
import com.core.zyyz.amc.modules.domain.AmcPubFunctionB;
import com.core.zyyz.amc.modules.service.AmcPubFunctionBService;

/**
 * 公用功能配置Service业务层处理
 *
 * @author lfs
 * @date 2024-11-21
 */
@Service
public class AmcPubFunctionBServiceImpl implements AmcPubFunctionBService
{
    @Autowired
    private AmcPubFunctionBMapper amcPubFunctionBMapper;

    /**
     * 查询公用功能配置
     *
     * @param functionId 公用功能配置主键
     * @return 公用功能配置
     */
    @Override
    public AmcPubFunctionB selectAmcPubFunctionBByFunctionId(String functionId)
    {
        return amcPubFunctionBMapper.selectAmcPubFunctionBByFunctionId(functionId);
    }

    /**
     * 查询公用功能配置列表
     *
     * @param amcPubFunctionB 公用功能配置
     * @return 公用功能配置
     */
    @Override
    public List<AmcPubFunctionB> selectAmcPubFunctionBList(AmcPubFunctionB amcPubFunctionB)
    {
        return amcPubFunctionBMapper.selectAmcPubFunctionBList(amcPubFunctionB);
    }

    /**
     * 新增公用功能配置
     *
     * @param amcPubFunctionB 公用功能配置
     * @return 结果
     */
    @Override
    public int insertAmcPubFunctionB(AmcPubFunctionB amcPubFunctionB) {
        amcPubFunctionB.setFunctionId(UUID.randomUUID().toString());
        return amcPubFunctionBMapper.insertAmcPubFunctionB(amcPubFunctionB);
    }

    /**
     * 修改公用功能配置
     *
     * @param amcPubFunctionB 公用功能配置
     * @return 结果
     */
    @Override
    public int updateAmcPubFunctionB(AmcPubFunctionB amcPubFunctionB)
    {
        return amcPubFunctionBMapper.updateAmcPubFunctionB(amcPubFunctionB);
    }

    /**
     * 批量删除公用功能配置
     *
     * @param functionIds 需要删除的公用功能配置主键
     * @return 结果
     */
    @Override
    public int deleteAmcPubFunctionBByFunctionIds(String[] functionIds)
    {
        return amcPubFunctionBMapper.deleteAmcPubFunctionBByFunctionIds(functionIds);
    }

    /**
     * 删除公用功能配置信息
     *
     * @param functionId 公用功能配置主键
     * @return 结果
     */
    @Override
    public int deleteAmcPubFunctionBByFunctionId(String functionId)
    {
        return amcPubFunctionBMapper.deleteAmcPubFunctionBByFunctionId(functionId);
    }
}
